import base from '@/api/baseurl';
import request from '@/utils/request'


/* 获取所有机构记录 */
export function organizationFindorganizationall(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/organization/findorganizationall',
    method: 'get',
    params: query
  })
}

/* 新增一级机构 */
export function organizationAddorganization(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/organization/addorganization',
    method: 'post',
    data
  })
}


/* 新增子机构 */
export function organizationAddciorganization(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/organization/addciorganization',
    method: 'post',
    data
  })
}


/* 修改机构 */
export function organizationUpdateorganization(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/organization/updateorganization',
    method: 'post',
    data
  })
}


/* 删除机构 */
export function organizationDeleteorganization(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/organization/deleteorganization',
    method: 'get',
    params: query
  })
}

// export function findOrganization(query) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/organization/findOrganization',
//     method: 'get',
//     params: query
//   })
// }
// /* 获取子节点 */
// export function findziorganization(query) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/organization/findziorganization',
//     method: 'get',
//     params: query
//   })
// }


// export function fetchList(query) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/get-articles/editor_content',
//     method: 'get',
//     params: query
//   })
// }

// export function fetchArticle(id) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/vue-element-admin/article/detail',
//     method: 'get',
//     params: { id }
//   })
// }

// export function fetchPv(pv) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/vue-element-admin/article/pv',
//     method: 'get',
//     params: { pv }
//   })
// }

// export function createArticle(data) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/vue-element-admin/article/create',
//     method: 'post',
//     data
//   })
// }

// export function updateArticle(data) {
//   return request({
//     baseURL:base.appBaseApi,
//     url: '/vue-element-admin/article/update',
//     method: 'post',
//     data
//   })
// }
